package components {
	import UIFree.controls.uif_button;
	import UIFree.uif_component;
	
	import flash.events.MouseEvent;
	import flash.geom.Rectangle;

	public class clt_arrowB extends uif_button {
		public static const DEFAULTHEIGHT: int = 33;
		public function clt_arrowB(parent:uif_component, ax:int=0, ay:int=0, 
									awidth:int=0, aheight:int=0, caption: String='', 
									onClick: Function = null, styleClass: Object = 'buttonB') {
			super(parent, ax, ay, awidth, aheight, styleClass);
			text = caption;
			if (onClick != null) addEvent(MouseEvent.CLICK, onClick);
		}
		
		override protected function paint(a_styleClass: String, a_method: String = ''): void {
			var rect: Rectangle = getBorder();
			begin2(style);
			var w2: Number = rect.width / 2;
			var h2: Number = rect.height / 2;
			var w6: Number = rect.width / 5;
			this.graphics.moveTo(rect.x, rect.y + h2);
			this.graphics.lineTo(rect.x + h2, rect.y);
			this.graphics.lineTo(rect.x + rect.width - h2, rect.y);
			this.graphics.curveTo(rect.x + rect.width, rect.y, rect.x + rect.width, rect.y + h2);
			this.graphics.curveTo(rect.x + rect.width, rect.y + rect.height, rect.x + rect.width - h2, rect.y + rect.height);
			this.graphics.lineTo(rect.x + h2, rect.y + rect.height);
			this.graphics.lineTo(rect.x, rect.y + h2);
			this.graphics.endFill();
		}
		
	}
}